<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <script src="./jquery.min.js"></script>
</head>

<body>
    index.html

    <form>
        user： <input type="text" name="user" id="">
        pws <input type="text" name="pwd" id="">
        <input type="button" value="登录">
    </form>

    <script>


        $('input').on('click', function () {
            $.ajax({
                url: 'http://127.0.0.1:2000/login',
                type:'post',
                data:$('form').serialize(),
                success:function(res){
                    console.log(res,4444)
                },
            })
        })

    </script>


    <!-- <script src="http://127.0.0.1:2000/jsonp"></script> -->
</body>

</html>